Problem | Solution Pattern(s) |
How can we avoid Slow Tests | Shared Fixture(XXX); Fake Object(XXX); Test Double(XXX) |
How can we make code testable | Humble Object(XXX); Test-Specific Subclass(XXX) |
How can we verify logic independently | Stored Procedure Test(XXX); Back Door Manipulation(XXX); Layer Test(XXX); Fake Object(XXX); Mock Object(XXX); Test Double(XXX); Test Spy(XXX); Test Stub(XXX) |
How do we avoid Conditional Test Logic | Custom Assertion(XXX); Guard Assertion(XXX) |
How do we cause the Shared Fixture to be built before the first test method that needs it | Chained Tests(XXX); Lazy Setup(XXX); Prebuilt Fixture(XXX); Setup Decorator(XXX); SuiteFixture Setup(XXX) |
How do we construct the Fresh Fixture | Creation Method(XXX); Delegated Setup(XXX); Implicit Setup(XXX); Inline Setup(XXX) |
How do we design the SUT so that we can replace its dependencies at run time | Dependency Injection(XXX); Dependency Lookup(XXX); Test Hook(XXX) |
How do we develop and test software that depends on a database | Database Sandbox(XXX) |
How do we implement Behavior Verification | Mock Object(XXX); Test Spy(XXX) |
How do we make it easy to write and run tests | Test Automation Framework(XXX) |
How do we make tests self-checking | Behavior Verification(XXX); Custom Assertion(XXX); Delta Assertion(XXX); State Verification(XXX); Assertion Method(XXX) |
How do we organize our Test Methods onto Testcase Classes | Testcase Class per Class(XXX); Testcase Class per Feature(XXX); Testcase Class per Fixture(XXX) |
How do we prepare automated tests for our software | Data-Driven Test(XXX); Recorded Test(XXX); Scripted Test(XXX) |
How do we reduce Test Code Duplication | Custom Assertion(XXX); Parameterized Test(XXX); Data-Driven Test(XXX); Test Utility Method(XXX) |
How do we run the tests | Named Test Suite(XXX); Test Runner(XXX); Test Suite Object(XXX); Testcase Object(XXX) |
How do we specify the values to be used in tests | Derived Value(XXX); Dummy Object(XXX); Generated Value(XXX); Literal Value(XXX) |
How do we structure our test logic | Unfinished Test Assertion(XXX); Assertion Message(XXX); Four-Phase Test(XXX) |
How do we tear down the Test Fixture | Table Truncation Teardown(XXX); Transaction Rollback Teardown(XXX); Automated Teardown(XXX); Garbage-Collected Teardown(XXX); Implicit Teardown(XXX); Inline Teardown(XXX) |
How do we tell a Test Double what to return or expect | Configurable Test Double(XXX); Hard-Coded Test Double(XXX) |
How does the Test Runner know what tests to run | Test Discovery(XXX); Test Enumeration(XXX); Test Selection(XXX) |
What fixture strategy should we use | Fresh Fixture(XXX); Minimal Fixture(XXX); Shared Fixture(XXX); Standard Fixture(XXX) |
Where do we put our test code | Test Helper(XXX); Testcase Superclass(XXX); Test Method(XXX); Testcase Class(XXX) |